#include <iostream>
#include <iomanip>
#include <vector>

using namespace std;

int main()
{
	int n, index = 0;
	cin >> n;
	vector<int> value((n + 1) * (n + 2) / 2, 1);

	for (int i = 0; i <= n; i++) {
		int j;
		for (j = 0; j < n - i; j++) {
			cout << "   ";
		}
		cout << setw(3) << value[index++];		// for first value

		for (j = 1; j < i; j++) {
			value[index] = value[index - i - 1] + value[index - i];
			cout << "   " << setw(3) << value[index++];		// for other value
		}

		if (j == i) {
			cout << "   " << setw(3) << value[index++];		// for last value
		}
		cout << endl;
	}
	return 0;
}